#    Copyright 2012 New Mexico EPSCoR
#
#    This file is part of Teacher's P.E.T.
#
#    Teacher's P.E.T. is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    Teacher's P.E.T. is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with Teacher's P.E.T..  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls.defaults import *

from views import *

urlpatterns = patterns('',
        #(r'^$',index),
        #(r'^(?P<category>.+?)/(?P<title>.+?)/results/(?P<username>.+)/$',view_poll_results),
        #(r'^(?P<category>.+?)/(?P<title>.+?)/results/',view_poll_results),
        (r'^(?P<collection_category>.+?)/(?P<collection_title>.+?)/(?P<category>.+?)/(?P<title>.+?)/uploads/(?P<pk>.+?)/$',download),
        (r'^(?P<collection_category>.+?)/(?P<collection_title>.+?)/(?P<category>.+?)/(?P<title>.+?)/(?P<id>.+?)/uploads/(?P<pk>.+?)/$',download),
        (r'(?P<category>.+?)/(?P<title>.+?)/(?P<id>.+?)/uploads/(?P<pk>.+?)/',download),
        (r'(?P<category>.+?)/(?P<title>.+?)/uploads/(?P<pk>.+?)/',download),

        (r'^(?P<collection_category>.+?)/(?P<collection_title>.+?)/(?P<category>.+?)/(?P<title>.+?)/(?P<id>.+?)/$',view_question),
        (r'^(?P<collection_category>.+?)/(?P<collection_title>.+?)/(?P<category>.+?)/(?P<title>.+?)/$',view),
        (r'^(?P<category>.+?)/(?P<title>.+?)/(?P<id>.+?)/$',view_question),
        (r'^(?P<category>.+?)/(?P<title>.+?)/$',view),
        #(r'^(?P<category>.+?)/$',index),
)
